using System;
using System.Data;
using System.Configuration;
using System.Collections;
using System.Collections.Generic;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;

using Entities;
using Bll;

public partial class ViewOrder : System.Web.UI.Page
{

    protected void Page_Load(object sender, EventArgs e)
    {
        if (HttpContext.Current.Session["Login"] != null)
        {
            ArrayList arr = (ArrayList)HttpContext.Current.Session["Login"];
            ObjectDataSourceOrder.SelectMethod = "GetByUserName";
            ObjectDataSourceOrder.SelectParameters.Add("username", arr[0].ToString());
        }
    }
    protected void GvOrder_SelectedIndexChanged(object sender, EventArgs e)
    {
        int orderID = int.Parse(GvOrder.SelectedDataKey.Value.ToString());        
        Response.Redirect("ViewOrderDetail.aspx?id="+orderID+"");
    }
}
